package net.minecraft.src;

import java.util.Random;

public class BlockSpawnGuard extends Block
{
    public BlockSpawnGuard(int i, int j)
    {
        super(i, j, Material.wood);
    }
	
	public int getBlockTextureFromSide(int i)
    {
        if(i == 2 || i == 4)
        {
            return blockIndexInTexture + 1;
        } else
        {
            return blockIndexInTexture;
        }
    }

    public int idDropped(int i, Random random)
    {
        return 93;
    }
	
	public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
   {
		
		double x = entityplayer.posX + 2;
		double y = entityplayer.posY;
		double z = entityplayer.posZ + 2;
		EntityTownGuard entitytownguard = new EntityTownGuard(world);
		entitytownguard.setLocationAndAngles(x, y, z, world.rand.nextFloat() * 360F, 0.0F);
		world.entityJoinedWorld(entitytownguard);
		return true;
   }
}
	


	